/*
 * PathIterator.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.graphics;

/**
 * Path Iterator Interface.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface PathIterator {

// Public Static Fields. -------------------------------------------------------

  /**
   * Even-odd winding rule.
   */
  public static final int WIND_EVEN_ODD = 0;

  /**
   * Non-zero winding rule.
   */
  public static final int WIND_NON_ZERO = 1;

  /**
   * The segment type "MOVETO".
   */
  public static final int SEG_MOVETO = 0;

  /**
   * The segment type "LINETO".
   */
  public static final int SEG_LINETO = 1;

  /**
   * The segment type "QUADTO".
   */
  public static final int SEG_QUADTO = 2;

  /**
   * The segment type "CUBICTO".
   */
  public static final int SEG_CUBICTO = 3;

  /**
   * The segment type "CLOSE".
   */
  public static final int SEG_CLOSE = 4;

// Public Methods. -------------------------------------------------------------

  /**
   * Returns the winding rule.
   *
   * @return the winding rule
   */
  public int getWindingRule();

  /**
   * Returns <tt>true</tt> if the iteration is complete.
   *
   * @return <tt>true</tt> if the iteration is complete
   */
  public boolean isDone();

  /**
   * Moves the iterator to the next segment of the path.
   */
  public void next();

  /**
   * Returns the coordinates and type of the current path segment.
   *
   * @param coords an array  of length 6 that can be used to store the
   *               coordinates of the points
   *
   * @return the path-segment type of the current path segment.
   */
  public int currentSegment(int[] coords);

}
